package com.zhongge.preknow.proxy;


import java.util.Scanner;

/**
 * @ClassName NormalUser
 * @Description TODO 普通用户类
 * @Author zhongge
 * @Version 1.0
 */
public class NormalUser extends User{
    public NormalUser(String name, int userID) {
        super(name, userID);
    }

    @Override
    public int display() {
        System.out.println("普通用户" + name + "的操作菜单");
        System.out.println("1. 查找图书");
        System.out.println("2. 打印所有的图书");
        System.out.println("3. 退出系统");
        System.out.println("4. 借阅图书");
        System.out.println("5. 归还图书");
        System.out.println("6. 查看当前个人借阅情况");
        System.out.println("请选择你的操作：");
        Scanner scanner = new Scanner(System.in);
        int choice = scanner.nextInt();
        return choice;
    }

    @Override
    public String toString() {
        return "NormalUser{" +
                "name='" + name + '\'' +
                ", userID=" + userID +
                '}';
    }

    //借阅图书
    public void borrowBook(String bookName) {
        System.out.println("普通用户" + this.name + "借阅了" + bookName);
    }
}
